<template lang="">
    <div class="A">
        <h1>我是A组件</h1>
         {{ data }}
        <B></B>
    </div>
</template>
<script lang="ts" setup>
import B from './B.vue'
import { inject } from 'vue';
let data = inject('flag')
</script>

<style lang="less">
.A {
    width: 250px;
    height: 250px;
    background: blue;
    color: #fff;
}
</style>